import request from '@/api/request'

export function login(params) {
    return request({
        url: '/user/login',
        method: 'POST',
        data: params
    })
}

export function register(user) {
    return request({
        url: '/user/register',
        method: 'POST',
        data: user
    })
}

export function getCurrentUser() {
    return request({
        url: '/user/currentUser',
        method: 'GET'
    })
}

export function logout() {
    return request({
        url: '/user/logout',
        method: 'GET'
    })
}

export function updateUser(params) {
    return request({
        url: '/user/updateUser',
        method: 'POST',
        data: params
    })
}